<?php

namespace App\Services\AetherUpload;

use Encore\Admin\Admin;
use Illuminate\Support\ServiceProvider;

class AetherUploadServiceProvider extends ServiceProvider
{

    protected $defer = false;

    public function boot()
    {

        $this->loadViewsFrom(__DIR__ . '/resources/views', 'large-file-field');

        $this->loadTranslationsFrom(__DIR__ . '/translations', 'aetherupload');

        if (!$this->app->routesAreCached()) {
            require __DIR__ . '/routes/routes.php';
        }

        Admin::booting(function () {
            Admin::js('vendor/laravel-admin-ext/large-file-upload/js/aetherupload.admin.js');
            Admin::js('vendor/laravel-admin-ext/large-file-upload/js/bootstrap.file-input.js');
            Admin::js('vendor/laravel-admin-ext/large-file-upload/js/spark-md5.min.js');
        });
    }

    public function register()
    {
        //
    }


}
